#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int MOD = 1e9 + 7;
const int N = 2010;

void solve()
{
    int n;
    cin >> n;
    vector<int> a(n - 1);
    for(int i = 0; i < n - 1; i++) cin >> a[i];
    map<int, int> mp;
    mp[a[0]]++;
    int x = 0;
    for(int i = 1; i < n - 1; i++) { 
        int t = a[i] - a[i - 1];
        if(t > n || mp[t]) {
            x = t;
            continue;
        }
        mp[t]++;
    }
    if(mp.size() < n - 2){
        cout << "NO\n";
        return;
    }
    if(mp.size() == n - 1) {
        cout << "YES\n";
        return;
    }
    vector<int> ans;
    for(int i = 1; i <= n; i++) {
        if(mp[i] == 0) ans.push_back(i); 
    }
    if(ans[0] + ans[1] == x) {
        cout << "YES\n";
    }else{
        cout << "NO\n";
    }
}

int main()
{
    int t = 1;
    cin >> t;
    while (t--)
        solve();
    return 0;
}